<%@ page language="java" import="java.util.*, com.zjut.zs.util.tools.*,com.zjut.an.role.manager.*, com.zjut.an.role.dao.*,
com.zjut.an.config.manager.*, com.zjut.an.config.dao.*,com.zjut.an.util.tools.*,com.zjut.an.util.system.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>layui</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<link rel="stylesheet" type="text/css" href="../plugins/layuiadmin/layui/css/layui.css" media="all">
	<link rel="stylesheet" type="text/css" href="common/bootstrap/css/bootstrap.css" media="all">
	<link rel="stylesheet" type="text/css" href="common/global.css" media="all">
	<link rel="stylesheet" type="text/css" href="css/personal.css" media="all">
	<script src="js/city.js"></script>
  <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<body>
<%
if (session.getAttribute("admin") == null) {
	out.print("<script>alert('由于长时间未操作，系统已经自动注销，请重新登陆');</script>");
	out.print("<script>top.window.location='AdminLogin.html';</script>");
	out.close();
	return;
} 
AnConfigManager anconfig = (AnConfigManager) SpringContextUtil.getBean("AnConfigManager");
ZsHTMLCreat html = (ZsHTMLCreat) SpringContextUtil.getBean("ZsHTMLCreat");

%>
<form class="layui-form" action="">
  <div class="layui-form-item">
  	<div class="layui-inline">
	    <label class="layui-form-label">账号</label>
	    <div class="layui-input-block">
	      <input type="text" name="account" autocomplete="off" placeholder="请输入账号" class="layui-input">
	    </div>
    </div>
    <div class="layui-inline">
	    <label class="layui-form-label">是否禁用</label>
	    <div class="layui-input-block">
	      <input type="radio" name="active" value="禁用中" title="是" >
	      <input type="radio" name="active" value="启用中" title="否" checked="">
	    </div>
    </div>
  </div>
  
  <div class="layui-form-item">
  	<div class="layui-inline">
	    <label class="layui-form-label">密码</label>
	    <div class="layui-input-block">
	      <input type="password" name="password" placeholder="请输入密码" autocomplete="off" class="layui-input">
	    </div>
    </div>
    <div class="layui-inline">
	    <label class="layui-form-label">重复密码</label>
	    <div class="layui-input-block">
	      <input type="password" name="password2" placeholder="请输入密码" autocomplete="off" class="layui-input">
	    </div>
    </div>
  </div>

  <div class="layui-form-item">
  	<div class="layui-inline">
	    <label class="layui-form-label">真实姓名</label>
	    <div class="layui-input-block">
	      <input type="text" name="name" autocomplete="off" placeholder="请输入姓名" class="layui-input">
	    </div>
    </div>
    <div class="layui-inline">
	    <label class="layui-form-label">专业类型</label>
	    <div class="layui-input-block">
	      	<input type="text" name="usType" autocomplete="on" placeholder="请输入审核的专业" class="layui-input">
	    </div>
    </div>
  </div>

  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">联系电话</label>
      <div class="layui-input-block">
        <input type="tel" name="mobile" autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">打分规则</label>
      <div class="layui-input-block">
        <input type="text" name="lawno" autocomplete="off" class="layui-input"><i>写入A:10|B:15|C:20 字样分别表示各个分数可以打的上限数量</i>
      </div>
    </div>
  </div> 
			
		
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>
 
          
<script src="../plugins/layuiadmin/layui/layui.js" charset="utf-8"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
	var $;
	layui.use(['jquery'], function(){ 
	   $ = layui.$;
	});
layui.use(['form', 'layedit', 'laydate'], function(){
  var form = layui.form
  ,layer = layui.layer
  ,layedit = layui.layedit
  ,laydate = layui.laydate;
  
  //自定义验证规则
	form.verify({
	    password: function(value){
	      if($('input[name=password2]').val() !== value){
            return '两次密码输入不一致！';
	      }
	    }
	});
  
  //监听提交
  form.on('submit(demo1)', function(data){
    var rowStr = data.field;
    rowStr.jxDepart={
    	deId:rowStr.deId
    };
    delete rowStr.deId;
    $.ajax({
      	type:"post",
      	url:"../anUserAdd.action",
      	data:{
      		rowstr:JSON.stringify(rowStr)
      	},
      	async:true,
      	cache:false,
      	success:function(res){
      		layer.msg('提交成功');
			setTimeout(function(){
                window.parent.location.reload();//修改成功后刷新父界面
            }, 1000);
      	}
      });
    return false;
  });
  
});
</script>
</body>
</html>